3.1.100 \(\int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx\) [100]

3.1.100.1 Optimal result
3.1.100.2 Mathematica [B] (verified)
3.1.100.3 Rubi [A] (verified)
3.1.100.4 Maple [A] (verified)
3.1.100.5 Fricas [A] (verification not implemented)
3.1.100.6 Sympy [F(-1)]
3.1.100.7 Maxima [A] (verification not implemented)
3.1.100.8 Giac [A] (verification not implemented)
3.1.100.9 Mupad [B] (verification not implemented)

3.1.100.1 Optimal result

Integrand size = 28, antiderivative size = 169 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\frac {1}{2} a \left (a^4+10 a^2 b^2-15 b^4\right ) x-\frac {2 b^3 \left (5 a^2-b^2\right ) \log (\sin (c+d x))}{d}+\frac {2 b^3 \left (5 a^2-b^2\right ) \log (\tan (c+d x))}{d}+\frac {\left (b \left (5 a^4-10 a^2 b^2+b^4\right )+a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)\right ) \sin ^2(c+d x)}{2 d}+\frac {5 a b^4 \tan (c+d x)}{d}+\frac {b^5 \tan ^2(c+d x)}{2 d} \]

output
1/2*a*(a^4+10*a^2*b^2-15*b^4)*x-2*b^3*(5*a^2-b^2)*ln(sin(d*x+c))/d+2*b^3*( 
5*a^2-b^2)*ln(tan(d*x+c))/d+1/2*(b*(5*a^4-10*a^2*b^2+b^4)+a*(a^4-10*a^2*b^ 
2+5*b^4)*cot(d*x+c))*sin(d*x+c)^2/d+5*a*b^4*tan(d*x+c)/d+1/2*b^5*tan(d*x+c 
)^2/d
 
3.1.100.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(571\) vs. \(2(169)=338\).

Time = 6.36 (sec) , antiderivative size = 571, normalized size of antiderivative = 3.38 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\frac {b^3 \left (\frac {\cos ^2(c+d x) (a+b \tan (c+d x))^6 \left (b^2+a b \tan (c+d x)\right )}{2 b^4 \left (a^2+b^2\right )}-\frac {\left (-6 a^2+4 b^2\right ) \left (\frac {1}{2} \left (5 a^4-10 a^2 b^2+b^4+\frac {a^5-10 a^3 b^2+5 a b^4}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}-b \tan (c+d x)\right )+\frac {1}{2} \left (5 a^4-10 a^2 b^2+b^4-\frac {a^5-10 a^3 b^2+5 a b^4}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}+b \tan (c+d x)\right )+5 a b \left (2 a^2-b^2\right ) \tan (c+d x)+\frac {1}{2} b^2 \left (10 a^2-b^2\right ) \tan ^2(c+d x)+\frac {5}{3} a b^3 \tan ^3(c+d x)+\frac {1}{4} b^4 \tan ^4(c+d x)\right )+5 a \left (\frac {1}{2} \left (6 a^5-20 a^3 b^2+6 a b^4+\frac {a^6-15 a^4 b^2+15 a^2 b^4-b^6}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}-b \tan (c+d x)\right )+\frac {1}{2} \left (6 a^5-20 a^3 b^2+6 a b^4-\frac {a^6-15 a^4 b^2+15 a^2 b^4-b^6}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}+b \tan (c+d x)\right )+b \left (15 a^4-15 a^2 b^2+b^4\right ) \tan (c+d x)+a b^2 \left (10 a^2-3 b^2\right ) \tan ^2(c+d x)+\frac {1}{3} b^3 \left (15 a^2-b^2\right ) \tan ^3(c+d x)+\frac {3}{2} a b^4 \tan ^4(c+d x)+\frac {1}{5} b^5 \tan ^5(c+d x)\right )}{2 b^2 \left (a^2+b^2\right )}\right )}{d} \]

input
Integrate[Sec[c + d*x]^3*(a*Cos[c + d*x] + b*Sin[c + d*x])^5,x]
 
output
(b^3*((Cos[c + d*x]^2*(a + b*Tan[c + d*x])^6*(b^2 + a*b*Tan[c + d*x]))/(2* 
b^4*(a^2 + b^2)) - ((-6*a^2 + 4*b^2)*(((5*a^4 - 10*a^2*b^2 + b^4 + (a^5 - 
10*a^3*b^2 + 5*a*b^4)/Sqrt[-b^2])*Log[Sqrt[-b^2] - b*Tan[c + d*x]])/2 + (( 
5*a^4 - 10*a^2*b^2 + b^4 - (a^5 - 10*a^3*b^2 + 5*a*b^4)/Sqrt[-b^2])*Log[Sq 
rt[-b^2] + b*Tan[c + d*x]])/2 + 5*a*b*(2*a^2 - b^2)*Tan[c + d*x] + (b^2*(1 
0*a^2 - b^2)*Tan[c + d*x]^2)/2 + (5*a*b^3*Tan[c + d*x]^3)/3 + (b^4*Tan[c + 
 d*x]^4)/4) + 5*a*(((6*a^5 - 20*a^3*b^2 + 6*a*b^4 + (a^6 - 15*a^4*b^2 + 15 
*a^2*b^4 - b^6)/Sqrt[-b^2])*Log[Sqrt[-b^2] - b*Tan[c + d*x]])/2 + ((6*a^5 
- 20*a^3*b^2 + 6*a*b^4 - (a^6 - 15*a^4*b^2 + 15*a^2*b^4 - b^6)/Sqrt[-b^2]) 
*Log[Sqrt[-b^2] + b*Tan[c + d*x]])/2 + b*(15*a^4 - 15*a^2*b^2 + b^4)*Tan[c 
 + d*x] + a*b^2*(10*a^2 - 3*b^2)*Tan[c + d*x]^2 + (b^3*(15*a^2 - b^2)*Tan[ 
c + d*x]^3)/3 + (3*a*b^4*Tan[c + d*x]^4)/2 + (b^5*Tan[c + d*x]^5)/5))/(2*b 
^2*(a^2 + b^2))))/d
 
3.1.100.3 Rubi [A] (verified)

Time = 0.48 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.02, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3042, 3567, 532, 25, 2333, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a \cos (c+d x)+b \sin (c+d x))^5}{\cos (c+d x)^3}dx\)

\(\Big \downarrow \) 3567

\(\displaystyle -\frac {\int \frac {(b+a \cot (c+d x))^5 \tan ^3(c+d x)}{\left (\cot ^2(c+d x)+1\right )^2}d\cot (c+d x)}{d}\)

\(\Big \downarrow \) 532

\(\displaystyle -\frac {-\frac {1}{2} \int -\frac {\left (2 b^5+10 a \cot (c+d x) b^4+2 \left (10 a^2-b^2\right ) \cot ^2(c+d x) b^3+a \left (a^4+10 b^2 a^2-5 b^4\right ) \cot ^3(c+d x)\right ) \tan ^3(c+d x)}{\cot ^2(c+d x)+1}d\cot (c+d x)-\frac {a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)+b \left (5 a^4-10 a^2 b^2+b^4\right )}{2 \left (\cot ^2(c+d x)+1\right )}}{d}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {\frac {1}{2} \int \frac {\left (2 b^5+10 a \cot (c+d x) b^4+2 \left (10 a^2-b^2\right ) \cot ^2(c+d x) b^3+a \left (a^4+10 b^2 a^2-5 b^4\right ) \cot ^3(c+d x)\right ) \tan ^3(c+d x)}{\cot ^2(c+d x)+1}d\cot (c+d x)-\frac {a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)+b \left (5 a^4-10 a^2 b^2+b^4\right )}{2 \left (\cot ^2(c+d x)+1\right )}}{d}\)

\(\Big \downarrow \) 2333

\(\displaystyle -\frac {\frac {1}{2} \int \left (2 \tan ^3(c+d x) b^5+10 a \tan ^2(c+d x) b^4+4 \left (5 a^2 b^3-b^5\right ) \tan (c+d x)+\frac {a \left (a^4+10 b^2 a^2-15 b^4\right )-4 b^3 \left (5 a^2-b^2\right ) \cot (c+d x)}{\cot ^2(c+d x)+1}\right )d\cot (c+d x)-\frac {a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)+b \left (5 a^4-10 a^2 b^2+b^4\right )}{2 \left (\cot ^2(c+d x)+1\right )}}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {\frac {1}{2} \left (-2 b^3 \left (5 a^2-b^2\right ) \log \left (\cot ^2(c+d x)+1\right )+4 b^3 \left (5 a^2-b^2\right ) \log (\cot (c+d x))+a \left (a^4+10 a^2 b^2-15 b^4\right ) \arctan (\cot (c+d x))-10 a b^4 \tan (c+d x)+b^5 \left (-\tan ^2(c+d x)\right )\right )-\frac {a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)+b \left (5 a^4-10 a^2 b^2+b^4\right )}{2 \left (\cot ^2(c+d x)+1\right )}}{d}\)

input
Int[Sec[c + d*x]^3*(a*Cos[c + d*x] + b*Sin[c + d*x])^5,x]
 
output
-((-1/2*(b*(5*a^4 - 10*a^2*b^2 + b^4) + a*(a^4 - 10*a^2*b^2 + 5*b^4)*Cot[c 
 + d*x])/(1 + Cot[c + d*x]^2) + (a*(a^4 + 10*a^2*b^2 - 15*b^4)*ArcTan[Cot[ 
c + d*x]] + 4*b^3*(5*a^2 - b^2)*Log[Cot[c + d*x]] - 2*b^3*(5*a^2 - b^2)*Lo 
g[1 + Cot[c + d*x]^2] - 10*a*b^4*Tan[c + d*x] - b^5*Tan[c + d*x]^2)/2)/d)
 

3.1.100.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 532
Int[(x_)^(m_)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbo 
l] :> With[{Qx = PolynomialQuotient[x^m*(c + d*x)^n, a + b*x^2, x], e = Coe 
ff[PolynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 0], f = Coeff[Pol 
ynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 1]}, Simp[(a*f - b*e*x) 
*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Simp[1/(2*a*(p + 1))   Int[x^m 
*(a + b*x^2)^(p + 1)*ExpandToSum[2*a*(p + 1)*(Qx/x^m) + e*((2*p + 3)/x^m), 
x], x], x]] /; FreeQ[{a, b, c, d}, x] && IGtQ[n, 0] && ILtQ[m, 0] && LtQ[p, 
 -1] && IntegerQ[2*p]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2333
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ 
ExpandIntegrand[(c*x)^m*Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] 
&& PolyQ[Pq, x] && IGtQ[p, -2]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3567
Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*si 
n[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[-d^(-1)   Subst[Int[x^m*((b 
+ a*x)^n/(1 + x^2)^((m + n + 2)/2)), x], x, Cot[c + d*x]], x] /; FreeQ[{a, 
b, c, d}, x] && IntegerQ[n] && IntegerQ[(m + n)/2] && NeQ[n, -1] &&  !(GtQ[ 
n, 0] && GtQ[m, 1])
 
3.1.100.4 Maple [A] (verified)

Time = 1.58 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.24

method result size
derivativedivides \(\frac {a^{5} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )-\frac {5 \cos \left (d x +c \right )^{2} a^{4} b}{2}+10 a^{3} b^{2} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+10 a^{2} b^{3} \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+5 a \,b^{4} \left (\frac {\sin \left (d x +c \right )^{5}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+b^{5} \left (\frac {\sin \left (d x +c \right )^{6}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{4}}{2}+\sin \left (d x +c \right )^{2}+2 \ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(209\)
default \(\frac {a^{5} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )-\frac {5 \cos \left (d x +c \right )^{2} a^{4} b}{2}+10 a^{3} b^{2} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+10 a^{2} b^{3} \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+5 a \,b^{4} \left (\frac {\sin \left (d x +c \right )^{5}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+b^{5} \left (\frac {\sin \left (d x +c \right )^{6}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{4}}{2}+\sin \left (d x +c \right )^{2}+2 \ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(209\)
parts \(\frac {a^{5} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {b^{5} \left (\frac {\sin \left (d x +c \right )^{6}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{4}}{2}+\sin \left (d x +c \right )^{2}+2 \ln \left (\cos \left (d x +c \right )\right )\right )}{d}+\frac {10 a^{3} b^{2} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {5 a \,b^{4} \left (\frac {\sin \left (d x +c \right )^{5}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )}{d}+\frac {10 a^{2} b^{3} \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}-\frac {5 a^{4} b}{2 d \sec \left (d x +c \right )^{2}}\) \(223\)
parallelrisch \(\frac {80 b^{3} \left (a^{2}-\frac {b^{2}}{5}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )-80 b^{3} \left (a^{2}-\frac {b^{2}}{5}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-80 b^{3} \left (a^{2}-\frac {b^{2}}{5}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (4 a^{5} d x +40 a^{3} b^{2} d x -60 a \,b^{4} d x -4 b^{5}\right ) \cos \left (2 d x +2 c \right )+\left (-5 a^{4} b +10 a^{2} b^{3}-b^{5}\right ) \cos \left (4 d x +4 c \right )+2 a \left (a^{2}-5 b^{2}\right )^{2} \sin \left (2 d x +2 c \right )+a \left (a^{4}-10 a^{2} b^{2}+5 b^{4}\right ) \sin \left (4 d x +4 c \right )+4 a^{5} d x +40 a^{3} b^{2} d x -60 a \,b^{4} d x +5 a^{4} b -10 a^{2} b^{3}+5 b^{5}}{8 d \left (1+\cos \left (2 d x +2 c \right )\right )}\) \(297\)
risch \(-\frac {4 i b^{5} c}{d}-\frac {5 i {\mathrm e}^{2 i \left (d x +c \right )} a \,b^{4}}{8 d}+\frac {a^{5} x}{2}+5 a^{3} b^{2} x -\frac {15 a \,b^{4} x}{2}-\frac {5 \,{\mathrm e}^{2 i \left (d x +c \right )} a^{4} b}{8 d}+\frac {5 \,{\mathrm e}^{2 i \left (d x +c \right )} a^{2} b^{3}}{4 d}-\frac {{\mathrm e}^{2 i \left (d x +c \right )} b^{5}}{8 d}-\frac {i {\mathrm e}^{2 i \left (d x +c \right )} a^{5}}{8 d}+\frac {20 i b^{3} a^{2} c}{d}+\frac {5 i {\mathrm e}^{2 i \left (d x +c \right )} a^{3} b^{2}}{4 d}-\frac {5 \,{\mathrm e}^{-2 i \left (d x +c \right )} a^{4} b}{8 d}+\frac {5 \,{\mathrm e}^{-2 i \left (d x +c \right )} a^{2} b^{3}}{4 d}-\frac {{\mathrm e}^{-2 i \left (d x +c \right )} b^{5}}{8 d}+10 i x \,a^{2} b^{3}-2 i x \,b^{5}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} a^{5}}{8 d}+\frac {5 i {\mathrm e}^{-2 i \left (d x +c \right )} a \,b^{4}}{8 d}-\frac {5 i {\mathrm e}^{-2 i \left (d x +c \right )} a^{3} b^{2}}{4 d}+\frac {2 b^{4} \left (5 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}+5 i a \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {10 b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{d}+\frac {2 b^{5} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) \(383\)
norman \(\frac {\left (\frac {1}{2} a^{5}+5 a^{3} b^{2}-\frac {15}{2} a \,b^{4}\right ) x +\left (-\frac {5}{2} a^{5}-25 a^{3} b^{2}+\frac {75}{2} a \,b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\left (-\frac {5}{2} a^{5}-25 a^{3} b^{2}+\frac {75}{2} a \,b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (\frac {1}{2} a^{5}+5 a^{3} b^{2}-\frac {15}{2} a \,b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (\frac {1}{2} a^{5}+5 a^{3} b^{2}-\frac {15}{2} a \,b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\left (\frac {1}{2} a^{5}+5 a^{3} b^{2}-\frac {15}{2} a \,b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14}+\left (\frac {3}{2} a^{5}+15 a^{3} b^{2}-\frac {45}{2} a \,b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (\frac {3}{2} a^{5}+15 a^{3} b^{2}-\frac {45}{2} a \,b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\frac {\left (10 a^{4} b -20 a^{2} b^{3}+4 b^{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d}+\frac {\left (10 a^{4} b -20 a^{2} b^{3}+4 b^{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}}{d}+\frac {\left (10 a^{4} b -20 a^{2} b^{3}+12 b^{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d}+\frac {\left (10 a^{4} b -20 a^{2} b^{3}+12 b^{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{d}+\frac {a \left (a^{4}-10 a^{2} b^{2}+15 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {a \left (3 a^{4}-30 a^{2} b^{2}-35 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}-\frac {\left (20 a^{4} b -40 a^{2} b^{3}-16 b^{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d}-\frac {\left (20 a^{4} b -40 a^{2} b^{3}-16 b^{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{d}+\frac {40 a \,b^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-\frac {40 a \,b^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{d}-\frac {a \left (a^{4}-10 a^{2} b^{2}+15 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{d}-\frac {a \left (3 a^{4}-30 a^{2} b^{2}-35 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2} \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{5}}-\frac {2 b^{3} \left (5 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {2 b^{3} \left (5 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}+\frac {2 b^{3} \left (5 a^{2}-b^{2}\right ) \ln \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}{d}\) \(770\)

input
int(sec(d*x+c)^3*(cos(d*x+c)*a+b*sin(d*x+c))^5,x,method=_RETURNVERBOSE)
 
output
1/d*(a^5*(1/2*sin(d*x+c)*cos(d*x+c)+1/2*d*x+1/2*c)-5/2*cos(d*x+c)^2*a^4*b+ 
10*a^3*b^2*(-1/2*sin(d*x+c)*cos(d*x+c)+1/2*d*x+1/2*c)+10*a^2*b^3*(-1/2*sin 
(d*x+c)^2-ln(cos(d*x+c)))+5*a*b^4*(sin(d*x+c)^5/cos(d*x+c)+(sin(d*x+c)^3+3 
/2*sin(d*x+c))*cos(d*x+c)-3/2*d*x-3/2*c)+b^5*(1/2*sin(d*x+c)^6/cos(d*x+c)^ 
2+1/2*sin(d*x+c)^4+sin(d*x+c)^2+2*ln(cos(d*x+c))))
 
3.1.100.5 Fricas [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.05 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\frac {2 \, b^{5} - 2 \, {\left (5 \, a^{4} b - 10 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{4} - 8 \, {\left (5 \, a^{2} b^{3} - b^{5}\right )} \cos \left (d x + c\right )^{2} \log \left (-\cos \left (d x + c\right )\right ) + {\left (5 \, a^{4} b - 10 \, a^{2} b^{3} + b^{5} + 2 \, {\left (a^{5} + 10 \, a^{3} b^{2} - 15 \, a b^{4}\right )} d x\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (10 \, a b^{4} \cos \left (d x + c\right ) + {\left (a^{5} - 10 \, a^{3} b^{2} + 5 \, a b^{4}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \]

input
integrate(sec(d*x+c)^3*(a*cos(d*x+c)+b*sin(d*x+c))^5,x, algorithm="fricas" 
)
 
output
1/4*(2*b^5 - 2*(5*a^4*b - 10*a^2*b^3 + b^5)*cos(d*x + c)^4 - 8*(5*a^2*b^3 
- b^5)*cos(d*x + c)^2*log(-cos(d*x + c)) + (5*a^4*b - 10*a^2*b^3 + b^5 + 2 
*(a^5 + 10*a^3*b^2 - 15*a*b^4)*d*x)*cos(d*x + c)^2 + 2*(10*a*b^4*cos(d*x + 
 c) + (a^5 - 10*a^3*b^2 + 5*a*b^4)*cos(d*x + c)^3)*sin(d*x + c))/(d*cos(d* 
x + c)^2)
 
3.1.100.6 Sympy [F(-1)]

Timed out. \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\text {Timed out} \]

input
integrate(sec(d*x+c)**3*(a*cos(d*x+c)+b*sin(d*x+c))**5,x)
 
output
Timed out
 
3.1.100.7 Maxima [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.06 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\frac {10 \, a^{4} b \sin \left (d x + c\right )^{2} + {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{5} + 10 \, {\left (2 \, d x + 2 \, c - \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} b^{2} - 20 \, {\left (\sin \left (d x + c\right )^{2} + \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )} a^{2} b^{3} - 10 \, {\left (3 \, d x + 3 \, c - \frac {\tan \left (d x + c\right )}{\tan \left (d x + c\right )^{2} + 1} - 2 \, \tan \left (d x + c\right )\right )} a b^{4} + 2 \, {\left (\sin \left (d x + c\right )^{2} - \frac {1}{\sin \left (d x + c\right )^{2} - 1} + 2 \, \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )} b^{5}}{4 \, d} \]

input
integrate(sec(d*x+c)^3*(a*cos(d*x+c)+b*sin(d*x+c))^5,x, algorithm="maxima" 
)
 
output
1/4*(10*a^4*b*sin(d*x + c)^2 + (2*d*x + 2*c + sin(2*d*x + 2*c))*a^5 + 10*( 
2*d*x + 2*c - sin(2*d*x + 2*c))*a^3*b^2 - 20*(sin(d*x + c)^2 + log(sin(d*x 
 + c)^2 - 1))*a^2*b^3 - 10*(3*d*x + 3*c - tan(d*x + c)/(tan(d*x + c)^2 + 1 
) - 2*tan(d*x + c))*a*b^4 + 2*(sin(d*x + c)^2 - 1/(sin(d*x + c)^2 - 1) + 2 
*log(sin(d*x + c)^2 - 1))*b^5)/d
 
3.1.100.8 Giac [A] (verification not implemented)

Time = 0.53 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.02 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\frac {b^{5} \tan \left (d x + c\right )^{2} + 10 \, a b^{4} \tan \left (d x + c\right ) + {\left (a^{5} + 10 \, a^{3} b^{2} - 15 \, a b^{4}\right )} {\left (d x + c\right )} + 2 \, {\left (5 \, a^{2} b^{3} - b^{5}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - \frac {10 \, a^{2} b^{3} \tan \left (d x + c\right )^{2} - 2 \, b^{5} \tan \left (d x + c\right )^{2} - a^{5} \tan \left (d x + c\right ) + 10 \, a^{3} b^{2} \tan \left (d x + c\right ) - 5 \, a b^{4} \tan \left (d x + c\right ) + 5 \, a^{4} b - b^{5}}{\tan \left (d x + c\right )^{2} + 1}}{2 \, d} \]

input
integrate(sec(d*x+c)^3*(a*cos(d*x+c)+b*sin(d*x+c))^5,x, algorithm="giac")
 
output
1/2*(b^5*tan(d*x + c)^2 + 10*a*b^4*tan(d*x + c) + (a^5 + 10*a^3*b^2 - 15*a 
*b^4)*(d*x + c) + 2*(5*a^2*b^3 - b^5)*log(tan(d*x + c)^2 + 1) - (10*a^2*b^ 
3*tan(d*x + c)^2 - 2*b^5*tan(d*x + c)^2 - a^5*tan(d*x + c) + 10*a^3*b^2*ta 
n(d*x + c) - 5*a*b^4*tan(d*x + c) + 5*a^4*b - b^5)/(tan(d*x + c)^2 + 1))/d
 
3.1.100.9 Mupad [B] (verification not implemented)

Time = 25.01 (sec) , antiderivative size = 354, normalized size of antiderivative = 2.09 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\frac {2\,\left (b^5\,\ln \left (\frac {\cos \left (c+d\,x\right )}{\cos \left (c+d\,x\right )+1}\right )-b^5\,\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )+\frac {a^5\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2}-5\,a^2\,b^3\,\ln \left (\frac {\cos \left (c+d\,x\right )}{\cos \left (c+d\,x\right )+1}\right )-\frac {15\,a\,b^4\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2}+5\,a^2\,b^3\,\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )+5\,a^3\,b^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\right )}{d}+\frac {\frac {5\,a^4\,b}{16}+\frac {9\,b^5}{16}-\frac {5\,a^2\,b^3}{8}-\frac {b^5\,\cos \left (4\,c+4\,d\,x\right )}{16}+\frac {a^5\,\sin \left (2\,c+2\,d\,x\right )}{8}+\frac {a^5\,\sin \left (4\,c+4\,d\,x\right )}{16}-\frac {5\,a^4\,b\,\cos \left (4\,c+4\,d\,x\right )}{16}+\frac {25\,a\,b^4\,\sin \left (2\,c+2\,d\,x\right )}{8}+\frac {5\,a\,b^4\,\sin \left (4\,c+4\,d\,x\right )}{16}+\frac {5\,a^2\,b^3\,\cos \left (4\,c+4\,d\,x\right )}{8}-\frac {5\,a^3\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{4}-\frac {5\,a^3\,b^2\,\sin \left (4\,c+4\,d\,x\right )}{8}}{d\,\left (\frac {\cos \left (2\,c+2\,d\,x\right )}{2}+\frac {1}{2}\right )} \]

input
int((a*cos(c + d*x) + b*sin(c + d*x))^5/cos(c + d*x)^3,x)
 
output
(2*(b^5*log(cos(c + d*x)/(cos(c + d*x) + 1)) - b^5*log(1/cos(c/2 + (d*x)/2 
)^2) + (a^5*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/2 - 5*a^2*b^3*log 
(cos(c + d*x)/(cos(c + d*x) + 1)) - (15*a*b^4*atan(sin(c/2 + (d*x)/2)/cos( 
c/2 + (d*x)/2)))/2 + 5*a^2*b^3*log(1/cos(c/2 + (d*x)/2)^2) + 5*a^3*b^2*ata 
n(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))))/d + ((5*a^4*b)/16 + (9*b^5)/16 
- (5*a^2*b^3)/8 - (b^5*cos(4*c + 4*d*x))/16 + (a^5*sin(2*c + 2*d*x))/8 + ( 
a^5*sin(4*c + 4*d*x))/16 - (5*a^4*b*cos(4*c + 4*d*x))/16 + (25*a*b^4*sin(2 
*c + 2*d*x))/8 + (5*a*b^4*sin(4*c + 4*d*x))/16 + (5*a^2*b^3*cos(4*c + 4*d* 
x))/8 - (5*a^3*b^2*sin(2*c + 2*d*x))/4 - (5*a^3*b^2*sin(4*c + 4*d*x))/8)/( 
d*(cos(2*c + 2*d*x)/2 + 1/2))